package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	import flash.utils.ByteArray;
	import protobuf.TNMT_STATE_TYPE;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class TNMT_BASE_INFO extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const BEGINTIME:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TNMT_BASE_INFO.beginTime", "beginTime", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		public var beginTime:uint;

		/**
		 *  @private
		 */
		public static const TOURNAMENTNAME:FieldDescriptor$TYPE_STRING = new FieldDescriptor$TYPE_STRING("protobuf.TNMT_BASE_INFO.tournamentName", "tournamentName", (2 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		public var tournamentName:String;

		/**
		 *  @private
		 */
		public static const BUY_IN_AMOUNT:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.TNMT_BASE_INFO.buy_in_amount", "buyInAmount", (3 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		public var buyInAmount:Number;

		/**
		 *  @private
		 */
		public static const CHARGE:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.TNMT_BASE_INFO.charge", "charge", (4 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		public var charge:Number;

		/**
		 *  @private
		 */
		public static const MAX_PLAYER:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TNMT_BASE_INFO.max_player", "maxPlayer", (5 << 3) | com.netease.protobuf.WireType.VARINT);

		public var maxPlayer:uint;

		/**
		 *  @private
		 */
		public static const CURRENT_PLAYER:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TNMT_BASE_INFO.current_player", "currentPlayer", (6 << 3) | com.netease.protobuf.WireType.VARINT);

		public var currentPlayer:uint;

		/**
		 *  @private
		 */
		public static const STATE:FieldDescriptor$TYPE_ENUM = new FieldDescriptor$TYPE_ENUM("protobuf.TNMT_BASE_INFO.state", "state", (7 << 3) | com.netease.protobuf.WireType.VARINT, protobuf.TNMT_STATE_TYPE);

		public var state:int;

		/**
		 *  @private
		 */
		public static const MODE:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TNMT_BASE_INFO.mode", "mode", (8 << 3) | com.netease.protobuf.WireType.VARINT);

		public var mode:uint;

		/**
		 *  @private
		 */
		public static const TOURNAMENT_ID:FieldDescriptor$TYPE_UINT64 = new FieldDescriptor$TYPE_UINT64("protobuf.TNMT_BASE_INFO.tournament_id", "tournamentId", (9 << 3) | com.netease.protobuf.WireType.VARINT);

		public var tournamentId:UInt64;

		/**
		 *  @private
		 */
		public static const IP:FieldDescriptor$TYPE_BYTES = new FieldDescriptor$TYPE_BYTES("protobuf.TNMT_BASE_INFO.ip", "ip", (10 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		public var ip:flash.utils.ByteArray;

		/**
		 *  @private
		 */
		public static const PORT:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TNMT_BASE_INFO.port", "port", (11 << 3) | com.netease.protobuf.WireType.VARINT);

		public var port:uint;

		/**
		 *  @private
		 */
		public static const TYPE:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TNMT_BASE_INFO.type", "type", (12 << 3) | com.netease.protobuf.WireType.VARINT);

		public var type:uint;

		/**
		 *  @private
		 */
		public static const CURRENCY:FieldDescriptor$TYPE_BYTES = new FieldDescriptor$TYPE_BYTES("protobuf.TNMT_BASE_INFO.currency", "currency", (13 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		public var currency:flash.utils.ByteArray;

		/**
		 *  @private
		 */
		public static const REBUY:FieldDescriptor$TYPE_BOOL = new FieldDescriptor$TYPE_BOOL("protobuf.TNMT_BASE_INFO.rebuy", "rebuy", (14 << 3) | com.netease.protobuf.WireType.VARINT);

		private var rebuy$field:Boolean;

		private var hasField$0:uint = 0;

		public function clearRebuy():void {
			hasField$0 &= 0xfffffffe;
			rebuy$field = new Boolean();
		}

		public function get hasRebuy():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set rebuy(value:Boolean):void {
			hasField$0 |= 0x1;
			rebuy$field = value;
		}

		public function get rebuy():Boolean {
			return rebuy$field;
		}

		/**
		 *  @private
		 */
		public static const LATE_REG:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.TNMT_BASE_INFO.late_reg", "lateReg", (15 << 3) | com.netease.protobuf.WireType.VARINT);

		private var late_reg$field:uint;

		public function clearLateReg():void {
			hasField$0 &= 0xfffffffd;
			late_reg$field = new uint();
		}

		public function get hasLateReg():Boolean {
			return (hasField$0 & 0x2) != 0;
		}

		public function set lateReg(value:uint):void {
			hasField$0 |= 0x2;
			late_reg$field = value;
		}

		public function get lateReg():uint {
			return late_reg$field;
		}

		/**
		 *  @private
		 */
		public static const REBUY_FEE:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.TNMT_BASE_INFO.rebuy_fee", "rebuyFee", (16 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var rebuy_fee$field:Number;

		public function clearRebuyFee():void {
			hasField$0 &= 0xfffffffb;
			rebuy_fee$field = new Number();
		}

		public function get hasRebuyFee():Boolean {
			return (hasField$0 & 0x4) != 0;
		}

		public function set rebuyFee(value:Number):void {
			hasField$0 |= 0x4;
			rebuy_fee$field = value;
		}

		public function get rebuyFee():Number {
			return rebuy_fee$field;
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.beginTime);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 2);
			com.netease.protobuf.WriteUtils.write$TYPE_STRING(output, this.tournamentName);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 3);
			com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, this.buyInAmount);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 4);
			com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, this.charge);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 5);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.maxPlayer);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 6);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.currentPlayer);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 7);
			com.netease.protobuf.WriteUtils.write$TYPE_ENUM(output, this.state);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 8);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.mode);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 9);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT64(output, this.tournamentId);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 10);
			com.netease.protobuf.WriteUtils.write$TYPE_BYTES(output, this.ip);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 11);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.port);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 12);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.type);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 13);
			com.netease.protobuf.WriteUtils.write$TYPE_BYTES(output, this.currency);
			if (hasRebuy) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 14);
				com.netease.protobuf.WriteUtils.write$TYPE_BOOL(output, rebuy$field);
			}
			if (hasLateReg) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 15);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, late_reg$field);
			}
			if (hasRebuyFee) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 16);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, rebuy_fee$field);
			}
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var beginTime$count:uint = 0;
			var tournamentName$count:uint = 0;
			var buy_in_amount$count:uint = 0;
			var charge$count:uint = 0;
			var max_player$count:uint = 0;
			var current_player$count:uint = 0;
			var state$count:uint = 0;
			var mode$count:uint = 0;
			var tournament_id$count:uint = 0;
			var ip$count:uint = 0;
			var port$count:uint = 0;
			var type$count:uint = 0;
			var currency$count:uint = 0;
			var rebuy$count:uint = 0;
			var late_reg$count:uint = 0;
			var rebuy_fee$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (beginTime$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.beginTime cannot be set twice.');
					}
					++beginTime$count;
					this.beginTime = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 2:
					if (tournamentName$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.tournamentName cannot be set twice.');
					}
					++tournamentName$count;
					this.tournamentName = com.netease.protobuf.ReadUtils.read$TYPE_STRING(input);
					break;
				case 3:
					if (buy_in_amount$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.buyInAmount cannot be set twice.');
					}
					++buy_in_amount$count;
					this.buyInAmount = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 4:
					if (charge$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.charge cannot be set twice.');
					}
					++charge$count;
					this.charge = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 5:
					if (max_player$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.maxPlayer cannot be set twice.');
					}
					++max_player$count;
					this.maxPlayer = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 6:
					if (current_player$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.currentPlayer cannot be set twice.');
					}
					++current_player$count;
					this.currentPlayer = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 7:
					if (state$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.state cannot be set twice.');
					}
					++state$count;
					this.state = com.netease.protobuf.ReadUtils.read$TYPE_ENUM(input);
					break;
				case 8:
					if (mode$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.mode cannot be set twice.');
					}
					++mode$count;
					this.mode = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 9:
					if (tournament_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.tournamentId cannot be set twice.');
					}
					++tournament_id$count;
					this.tournamentId = com.netease.protobuf.ReadUtils.read$TYPE_UINT64(input);
					break;
				case 10:
					if (ip$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.ip cannot be set twice.');
					}
					++ip$count;
					this.ip = com.netease.protobuf.ReadUtils.read$TYPE_BYTES(input);
					break;
				case 11:
					if (port$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.port cannot be set twice.');
					}
					++port$count;
					this.port = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 12:
					if (type$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.type cannot be set twice.');
					}
					++type$count;
					this.type = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 13:
					if (currency$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.currency cannot be set twice.');
					}
					++currency$count;
					this.currency = com.netease.protobuf.ReadUtils.read$TYPE_BYTES(input);
					break;
				case 14:
					if (rebuy$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.rebuy cannot be set twice.');
					}
					++rebuy$count;
					this.rebuy = com.netease.protobuf.ReadUtils.read$TYPE_BOOL(input);
					break;
				case 15:
					if (late_reg$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.lateReg cannot be set twice.');
					}
					++late_reg$count;
					this.lateReg = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 16:
					if (rebuy_fee$count != 0) {
						throw new flash.errors.IOError('Bad data format: TNMT_BASE_INFO.rebuyFee cannot be set twice.');
					}
					++rebuy_fee$count;
					this.rebuyFee = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
